package binary;
/**补码的演示*/
public class ComplementDemo {
    public static void main(String[] args) {
        int max=Integer.MAX_VALUE;//int的最大值
        int min =Integer.MIN_VALUE;//int的最小值
        System.out.println(Integer.toBinaryString(max));
        System.out.println(Integer.toBinaryString(min));
        System.out.println(Integer.toBinaryString(-1));
        int a=45;
        System.out.println(Integer.toBinaryString(a));//按2进制输出
        System.out.println(a);//按10进制输出

    }
}

